package com.jielihaofeng.nettyadvance.rpc.protocol;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author Johnnie Wind
 * @description 自增ID生成器
 * @date 2021/11/19 17:43
 */
public abstract class SequenceIdGenerator {
    private static final AtomicInteger id = new AtomicInteger();

    public static int nextId() {
        return id.incrementAndGet();
    }
}
